package com.tn.wservice.validator;

import java.lang.reflect.Method;

public class PropertyValueGenerator implements IValueGenerator {

	private String getterMethod;
	
	
	@Override
	public Number getValue(Object bo) throws Exception {
		Method lhsMethod = bo.getClass().getMethod(getGetterMethod());
		return (Number) lhsMethod.invoke(bo);
	}


	public void setGetterMethod(String getterMethod) {
		this.getterMethod = getterMethod;
	}

	public String getGetterMethod() {
		return getterMethod;
	}

}
